﻿#region Using directives

using System;
using System.Data;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;

using NetROS.Tiers.Entities;
using NetROS.Tiers.Data;

#endregion

namespace NetROS.Tiers.Data.Bases
{	
	///<summary>
	/// This class is the base class for any <see cref="DokumentStavkaProviderBase"/> implementation.
	/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
	///</summary>
	public abstract partial class DokumentStavkaProviderBaseCore : EntityProviderBase<NetROS.Tiers.Entities.DokumentStavka, NetROS.Tiers.Entities.DokumentStavkaKey>
	{		
		#region Get from Many To Many Relationship Functions
		#endregion	
		
		#region Delete Methods

		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to delete.</param>
		/// <returns>Returns true if operation suceeded.</returns>
		public override bool Delete(TransactionManager transactionManager, NetROS.Tiers.Entities.DokumentStavkaKey key)
		{
			return Delete(transactionManager, key.ID);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="iD">. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public bool Delete(System.Int32 iD)
		{
			return Delete(null, iD);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iD">. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public abstract bool Delete(TransactionManager transactionManager, System.Int32 iD);		
		
		#endregion Delete Methods
		
		#region Get By Foreign Key Functions
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblArtikl key.
		///		FK_tblDokumentStavka_tblArtikl Description: 
		/// </summary>
		/// <param name="iDArtikl"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtikl(System.Int32? iDArtikl)
		{
			int count = -1;
			return GetByIDArtikl(iDArtikl, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblArtikl key.
		///		FK_tblDokumentStavka_tblArtikl Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDArtikl"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		/// <remarks></remarks>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtikl(TransactionManager transactionManager, System.Int32? iDArtikl)
		{
			int count = -1;
			return GetByIDArtikl(transactionManager, iDArtikl, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblArtikl key.
		///		FK_tblDokumentStavka_tblArtikl Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtikl(TransactionManager transactionManager, System.Int32? iDArtikl, int start, int pageLength)
		{
			int count = -1;
			return GetByIDArtikl(transactionManager, iDArtikl, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblArtikl key.
		///		fK_tblDokumentStavka_tblArtikl Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDArtikl"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtikl(System.Int32? iDArtikl, int start, int pageLength)
		{
			int count =  -1;
			return GetByIDArtikl(null, iDArtikl, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblArtikl key.
		///		fK_tblDokumentStavka_tblArtikl Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDArtikl"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtikl(System.Int32? iDArtikl, int start, int pageLength,out int count)
		{
			return GetByIDArtikl(null, iDArtikl, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblArtikl key.
		///		FK_tblDokumentStavka_tblArtikl Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtikl(TransactionManager transactionManager, System.Int32? iDArtikl, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDjelatnik key.
		///		FK_tblDokumentStavka_tblDjelatnik Description: 
		/// </summary>
		/// <param name="iDUserModified"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDUserModified(System.Int32 iDUserModified)
		{
			int count = -1;
			return GetByIDUserModified(iDUserModified, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDjelatnik key.
		///		FK_tblDokumentStavka_tblDjelatnik Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDUserModified"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		/// <remarks></remarks>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDUserModified(TransactionManager transactionManager, System.Int32 iDUserModified)
		{
			int count = -1;
			return GetByIDUserModified(transactionManager, iDUserModified, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDjelatnik key.
		///		FK_tblDokumentStavka_tblDjelatnik Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDUserModified"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDUserModified(TransactionManager transactionManager, System.Int32 iDUserModified, int start, int pageLength)
		{
			int count = -1;
			return GetByIDUserModified(transactionManager, iDUserModified, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDjelatnik key.
		///		fK_tblDokumentStavka_tblDjelatnik Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDUserModified"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDUserModified(System.Int32 iDUserModified, int start, int pageLength)
		{
			int count =  -1;
			return GetByIDUserModified(null, iDUserModified, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDjelatnik key.
		///		fK_tblDokumentStavka_tblDjelatnik Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDUserModified"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDUserModified(System.Int32 iDUserModified, int start, int pageLength,out int count)
		{
			return GetByIDUserModified(null, iDUserModified, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDjelatnik key.
		///		FK_tblDokumentStavka_tblDjelatnik Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDUserModified"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDUserModified(TransactionManager transactionManager, System.Int32 iDUserModified, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDokument key.
		///		FK_tblDokumentStavka_tblDokument Description: 
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokument(System.Int32 iDDokument)
		{
			int count = -1;
			return GetByIDDokument(iDDokument, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDokument key.
		///		FK_tblDokumentStavka_tblDokument Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		/// <remarks></remarks>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokument(TransactionManager transactionManager, System.Int32 iDDokument)
		{
			int count = -1;
			return GetByIDDokument(transactionManager, iDDokument, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDokument key.
		///		FK_tblDokumentStavka_tblDokument Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokument(TransactionManager transactionManager, System.Int32 iDDokument, int start, int pageLength)
		{
			int count = -1;
			return GetByIDDokument(transactionManager, iDDokument, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDokument key.
		///		fK_tblDokumentStavka_tblDokument Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDDokument"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokument(System.Int32 iDDokument, int start, int pageLength)
		{
			int count =  -1;
			return GetByIDDokument(null, iDDokument, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDokument key.
		///		fK_tblDokumentStavka_tblDokument Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDDokument"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokument(System.Int32 iDDokument, int start, int pageLength,out int count)
		{
			return GetByIDDokument(null, iDDokument, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblDokument key.
		///		FK_tblDokumentStavka_tblDokument Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokument(TransactionManager transactionManager, System.Int32 iDDokument, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta key.
		///		FK_tblDokumentStavka_tblValuta Description: 
		/// </summary>
		/// <param name="iDValuta"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta(System.Int32? iDValuta)
		{
			int count = -1;
			return GetByIDValuta(iDValuta, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta key.
		///		FK_tblDokumentStavka_tblValuta Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDValuta"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		/// <remarks></remarks>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta(TransactionManager transactionManager, System.Int32? iDValuta)
		{
			int count = -1;
			return GetByIDValuta(transactionManager, iDValuta, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta key.
		///		FK_tblDokumentStavka_tblValuta Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDValuta"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta(TransactionManager transactionManager, System.Int32? iDValuta, int start, int pageLength)
		{
			int count = -1;
			return GetByIDValuta(transactionManager, iDValuta, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta key.
		///		fK_tblDokumentStavka_tblValuta Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDValuta"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta(System.Int32? iDValuta, int start, int pageLength)
		{
			int count =  -1;
			return GetByIDValuta(null, iDValuta, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta key.
		///		fK_tblDokumentStavka_tblValuta Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDValuta"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta(System.Int32? iDValuta, int start, int pageLength,out int count)
		{
			return GetByIDValuta(null, iDValuta, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta key.
		///		FK_tblDokumentStavka_tblValuta Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDValuta"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta(TransactionManager transactionManager, System.Int32? iDValuta, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta1 key.
		///		FK_tblDokumentStavka_tblValuta1 Description: 
		/// </summary>
		/// <param name="iDValuta2"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta2(System.Int32? iDValuta2)
		{
			int count = -1;
			return GetByIDValuta2(iDValuta2, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta1 key.
		///		FK_tblDokumentStavka_tblValuta1 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDValuta2"></param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		/// <remarks></remarks>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta2(TransactionManager transactionManager, System.Int32? iDValuta2)
		{
			int count = -1;
			return GetByIDValuta2(transactionManager, iDValuta2, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta1 key.
		///		FK_tblDokumentStavka_tblValuta1 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDValuta2"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta2(TransactionManager transactionManager, System.Int32? iDValuta2, int start, int pageLength)
		{
			int count = -1;
			return GetByIDValuta2(transactionManager, iDValuta2, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta1 key.
		///		fK_tblDokumentStavka_tblValuta1 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDValuta2"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta2(System.Int32? iDValuta2, int start, int pageLength)
		{
			int count =  -1;
			return GetByIDValuta2(null, iDValuta2, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta1 key.
		///		fK_tblDokumentStavka_tblValuta1 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="iDValuta2"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta2(System.Int32? iDValuta2, int start, int pageLength,out int count)
		{
			return GetByIDValuta2(null, iDValuta2, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_tblDokumentStavka_tblValuta1 key.
		///		FK_tblDokumentStavka_tblValuta1 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDValuta2"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of NetROS.Tiers.Entities.DokumentStavka objects.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDValuta2(TransactionManager transactionManager, System.Int32? iDValuta2, int start, int pageLength, out int count);
		
		#endregion

		#region Get By Index Functions
		
		/// <summary>
		/// 	Gets a row from the DataSource based on its primary key.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to retrieve.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <returns>Returns an instance of the Entity class.</returns>
		public override NetROS.Tiers.Entities.DokumentStavka Get(TransactionManager transactionManager, NetROS.Tiers.Entities.DokumentStavkaKey key, int start, int pageLength)
		{
			return GetByID(transactionManager, key.ID, start, pageLength);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key _dta_index_tblDokumentStavka_5_1021103274__K2_K3_K17 index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDDokument"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtiklIDDokument(System.Int32 iDOrgJedOd, System.Int32? iDArtikl, System.Int32 iDDokument)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtiklIDDokument(null,iDOrgJedOd, iDArtikl, iDDokument, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K2_K3_K17 index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDDokument"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtiklIDDokument(System.Int32 iDOrgJedOd, System.Int32? iDArtikl, System.Int32 iDDokument, int start, int pageLength)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtiklIDDokument(null, iDOrgJedOd, iDArtikl, iDDokument, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K2_K3_K17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDDokument"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtiklIDDokument(TransactionManager transactionManager, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, System.Int32 iDDokument)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtiklIDDokument(transactionManager, iDOrgJedOd, iDArtikl, iDDokument, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K2_K3_K17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDDokument"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtiklIDDokument(TransactionManager transactionManager, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, System.Int32 iDDokument, int start, int pageLength)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtiklIDDokument(transactionManager, iDOrgJedOd, iDArtikl, iDDokument, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K2_K3_K17 index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDDokument"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtiklIDDokument(System.Int32 iDOrgJedOd, System.Int32? iDArtikl, System.Int32 iDDokument, int start, int pageLength, out int count)
		{
			return GetByIDOrgJedOdIDArtiklIDDokument(null, iDOrgJedOd, iDArtikl, iDDokument, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K2_K3_K17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDDokument"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtiklIDDokument(TransactionManager transactionManager, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, System.Int32 iDDokument, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key _dta_index_tblDokumentStavka_5_1021103274__K3_K2_4_9_10_17 index.
		/// </summary>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtiklIDOrgJedOd(System.Int32? iDArtikl, System.Int32 iDOrgJedOd)
		{
			int count = -1;
			return GetByIDArtiklIDOrgJedOd(null,iDArtikl, iDOrgJedOd, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K3_K2_4_9_10_17 index.
		/// </summary>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtiklIDOrgJedOd(System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength)
		{
			int count = -1;
			return GetByIDArtiklIDOrgJedOd(null, iDArtikl, iDOrgJedOd, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K3_K2_4_9_10_17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtiklIDOrgJedOd(TransactionManager transactionManager, System.Int32? iDArtikl, System.Int32 iDOrgJedOd)
		{
			int count = -1;
			return GetByIDArtiklIDOrgJedOd(transactionManager, iDArtikl, iDOrgJedOd, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K3_K2_4_9_10_17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtiklIDOrgJedOd(TransactionManager transactionManager, System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength)
		{
			int count = -1;
			return GetByIDArtiklIDOrgJedOd(transactionManager, iDArtikl, iDOrgJedOd, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K3_K2_4_9_10_17 index.
		/// </summary>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtiklIDOrgJedOd(System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength, out int count)
		{
			return GetByIDArtiklIDOrgJedOd(null, iDArtikl, iDOrgJedOd, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_5_1021103274__K3_K2_4_9_10_17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDArtiklIDOrgJedOd(TransactionManager transactionManager, System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key _dta_index_tblDokumentStavka_7_1021103274__K17_K3_K1_K2_K10_4_22 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iD"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="vrijednost3"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iD, System.Int32 iDOrgJedOd, System.Decimal? vrijednost3)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(null,iDDokument, iDArtikl, iD, iDOrgJedOd, vrijednost3, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K17_K3_K1_K2_K10_4_22 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iD"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="vrijednost3"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iD, System.Int32 iDOrgJedOd, System.Decimal? vrijednost3, int start, int pageLength)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(null, iDDokument, iDArtikl, iD, iDOrgJedOd, vrijednost3, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K17_K3_K1_K2_K10_4_22 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iD"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="vrijednost3"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iD, System.Int32 iDOrgJedOd, System.Decimal? vrijednost3)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(transactionManager, iDDokument, iDArtikl, iD, iDOrgJedOd, vrijednost3, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K17_K3_K1_K2_K10_4_22 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iD"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="vrijednost3"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iD, System.Int32 iDOrgJedOd, System.Decimal? vrijednost3, int start, int pageLength)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(transactionManager, iDDokument, iDArtikl, iD, iDOrgJedOd, vrijednost3, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K17_K3_K1_K2_K10_4_22 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iD"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="vrijednost3"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iD, System.Int32 iDOrgJedOd, System.Decimal? vrijednost3, int start, int pageLength, out int count)
		{
			return GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(null, iDDokument, iDArtikl, iD, iDOrgJedOd, vrijednost3, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K17_K3_K1_K2_K10_4_22 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iD"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="vrijednost3"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDIDOrgJedOdVrijednost3(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iD, System.Int32 iDOrgJedOd, System.Decimal? vrijednost3, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key _dta_index_tblDokumentStavka_7_1021103274__K2_K3_4_17 index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtikl(System.Int32 iDOrgJedOd, System.Int32? iDArtikl)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtikl(null,iDOrgJedOd, iDArtikl, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K2_K3_4_17 index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtikl(System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtikl(null, iDOrgJedOd, iDArtikl, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K2_K3_4_17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtikl(TransactionManager transactionManager, System.Int32 iDOrgJedOd, System.Int32? iDArtikl)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtikl(transactionManager, iDOrgJedOd, iDArtikl, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K2_K3_4_17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtikl(TransactionManager transactionManager, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength)
		{
			int count = -1;
			return GetByIDOrgJedOdIDArtikl(transactionManager, iDOrgJedOd, iDArtikl, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K2_K3_4_17 index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtikl(System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength, out int count)
		{
			return GetByIDOrgJedOdIDArtikl(null, iDOrgJedOd, iDArtikl, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_7_1021103274__K2_K3_4_17 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOdIDArtikl(TransactionManager transactionManager, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key _dta_index_tblDokumentStavka_8_1021103274__K17_K2_K3_4_9_10 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDOrgJedOdIDArtikl(System.Int32 iDDokument, System.Int32 iDOrgJedOd, System.Int32? iDArtikl)
		{
			int count = -1;
			return GetByIDDokumentIDOrgJedOdIDArtikl(null,iDDokument, iDOrgJedOd, iDArtikl, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_8_1021103274__K17_K2_K3_4_9_10 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDOrgJedOdIDArtikl(System.Int32 iDDokument, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength)
		{
			int count = -1;
			return GetByIDDokumentIDOrgJedOdIDArtikl(null, iDDokument, iDOrgJedOd, iDArtikl, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_8_1021103274__K17_K2_K3_4_9_10 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDOrgJedOdIDArtikl(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32 iDOrgJedOd, System.Int32? iDArtikl)
		{
			int count = -1;
			return GetByIDDokumentIDOrgJedOdIDArtikl(transactionManager, iDDokument, iDOrgJedOd, iDArtikl, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_8_1021103274__K17_K2_K3_4_9_10 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDOrgJedOdIDArtikl(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength)
		{
			int count = -1;
			return GetByIDDokumentIDOrgJedOdIDArtikl(transactionManager, iDDokument, iDOrgJedOd, iDArtikl, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_8_1021103274__K17_K2_K3_4_9_10 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDOrgJedOdIDArtikl(System.Int32 iDDokument, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength, out int count)
		{
			return GetByIDDokumentIDOrgJedOdIDArtikl(null, iDDokument, iDOrgJedOd, iDArtikl, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the _dta_index_tblDokumentStavka_8_1021103274__K17_K2_K3_4_9_10 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDOrgJedOdIDArtikl(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32 iDOrgJedOd, System.Int32? iDArtikl, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key IX_DokumentStavka_IDDokument_INC_Vrijednost2 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDOrgJedOd(System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iDOrgJedOd)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDOrgJedOd(null,iDDokument, iDArtikl, iDOrgJedOd, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_DokumentStavka_IDDokument_INC_Vrijednost2 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDOrgJedOd(System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDOrgJedOd(null, iDDokument, iDArtikl, iDOrgJedOd, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_DokumentStavka_IDDokument_INC_Vrijednost2 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDOrgJedOd(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iDOrgJedOd)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDOrgJedOd(transactionManager, iDDokument, iDArtikl, iDOrgJedOd, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_DokumentStavka_IDDokument_INC_Vrijednost2 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDOrgJedOd(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength)
		{
			int count = -1;
			return GetByIDDokumentIDArtiklIDOrgJedOd(transactionManager, iDDokument, iDArtikl, iDOrgJedOd, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_DokumentStavka_IDDokument_INC_Vrijednost2 index.
		/// </summary>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDOrgJedOd(System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength, out int count)
		{
			return GetByIDDokumentIDArtiklIDOrgJedOd(null, iDDokument, iDArtikl, iDOrgJedOd, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_DokumentStavka_IDDokument_INC_Vrijednost2 index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDDokument"></param>
		/// <param name="iDArtikl"></param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDDokumentIDArtiklIDOrgJedOd(TransactionManager transactionManager, System.Int32 iDDokument, System.Int32? iDArtikl, System.Int32 iDOrgJedOd, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key IX_Organizacija index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOd(System.Int32 iDOrgJedOd)
		{
			int count = -1;
			return GetByIDOrgJedOd(null,iDOrgJedOd, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_Organizacija index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOd(System.Int32 iDOrgJedOd, int start, int pageLength)
		{
			int count = -1;
			return GetByIDOrgJedOd(null, iDOrgJedOd, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_Organizacija index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOd(TransactionManager transactionManager, System.Int32 iDOrgJedOd)
		{
			int count = -1;
			return GetByIDOrgJedOd(transactionManager, iDOrgJedOd, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_Organizacija index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOd(TransactionManager transactionManager, System.Int32 iDOrgJedOd, int start, int pageLength)
		{
			int count = -1;
			return GetByIDOrgJedOd(transactionManager, iDOrgJedOd, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_Organizacija index.
		/// </summary>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOd(System.Int32 iDOrgJedOd, int start, int pageLength, out int count)
		{
			return GetByIDOrgJedOd(null, iDOrgJedOd, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the IX_Organizacija index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iDOrgJedOd"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/> class.</returns>
		public abstract NetROS.Tiers.Entities.TList<DokumentStavka> GetByIDOrgJedOd(TransactionManager transactionManager, System.Int32 iDOrgJedOd, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key PK_tblDokumentStavka index.
		/// </summary>
		/// <param name="iD"></param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> class.</returns>
		public NetROS.Tiers.Entities.DokumentStavka GetByID(System.Int32 iD)
		{
			int count = -1;
			return GetByID(null,iD, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_tblDokumentStavka index.
		/// </summary>
		/// <param name="iD"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> class.</returns>
		public NetROS.Tiers.Entities.DokumentStavka GetByID(System.Int32 iD, int start, int pageLength)
		{
			int count = -1;
			return GetByID(null, iD, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_tblDokumentStavka index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iD"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> class.</returns>
		public NetROS.Tiers.Entities.DokumentStavka GetByID(TransactionManager transactionManager, System.Int32 iD)
		{
			int count = -1;
			return GetByID(transactionManager, iD, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_tblDokumentStavka index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iD"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> class.</returns>
		public NetROS.Tiers.Entities.DokumentStavka GetByID(TransactionManager transactionManager, System.Int32 iD, int start, int pageLength)
		{
			int count = -1;
			return GetByID(transactionManager, iD, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_tblDokumentStavka index.
		/// </summary>
		/// <param name="iD"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> class.</returns>
		public NetROS.Tiers.Entities.DokumentStavka GetByID(System.Int32 iD, int start, int pageLength, out int count)
		{
			return GetByID(null, iD, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_tblDokumentStavka index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="iD"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> class.</returns>
		public abstract NetROS.Tiers.Entities.DokumentStavka GetByID(TransactionManager transactionManager, System.Int32 iD, int start, int pageLength, out int count);
						
		#endregion "Get By Index Functions"
	
		#region Custom Methods
		
		
		#region _tblDokumentStavka_StavkaKrozVeze 
		
		/// <summary>
		///	This method wrap the '_tblDokumentStavka_StavkaKrozVeze' stored procedure. 
		/// </summary>
		/// <param name="IDZaTraziti"> A <c>System.Int32?</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="IDataReader"/> instance.</returns>
		public IDataReader StavkaKrozVeze(System.Int32? @IDZaTraziti)
		{
			return StavkaKrozVeze(null, 0, int.MaxValue , @IDZaTraziti);
		}
		
		/// <summary>
		///	This method wrap the '_tblDokumentStavka_StavkaKrozVeze' stored procedure. 
		/// </summary>
		/// <param name="IDZaTraziti"> A <c>System.Int32?</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="IDataReader"/> instance.</returns>
		public IDataReader StavkaKrozVeze(int start, int pageLength, System.Int32? @IDZaTraziti)
		{
			return StavkaKrozVeze(null, start, pageLength , @IDZaTraziti);
		}
				
		/// <summary>
		///	This method wrap the '_tblDokumentStavka_StavkaKrozVeze' stored procedure. 
		/// </summary>
		/// <param name="IDZaTraziti"> A <c>System.Int32?</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="IDataReader"/> instance.</returns>
		public IDataReader StavkaKrozVeze(TransactionManager transactionManager, System.Int32? @IDZaTraziti)
		{
			return StavkaKrozVeze(transactionManager, 0, int.MaxValue , @IDZaTraziti);
		}
		
		/// <summary>
		///	This method wrap the '_tblDokumentStavka_StavkaKrozVeze' stored procedure. 
		/// </summary>
		/// <param name="IDZaTraziti"> A <c>System.Int32?</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="IDataReader"/> instance.</returns>
		public abstract IDataReader StavkaKrozVeze(TransactionManager transactionManager, int start, int pageLength , System.Int32? @IDZaTraziti);
		
		#endregion
		
		#endregion

		#region Helper Functions	
		
		/// <summary>
		/// Fill a NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt; From a DataReader.
		/// </summary>
		/// <param name="reader">Datareader</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">number of rows.</param>
		/// <returns>a <see cref="NetROS.Tiers.Entities.TList&lt;DokumentStavka&gt;"/></returns>
		public static NetROS.Tiers.Entities.TList<DokumentStavka> Fill(IDataReader reader, NetROS.Tiers.Entities.TList<DokumentStavka> rows, int start, int pageLength)
		{
		// advance to the starting row
		for (int i = 0; i < start; i++)
		{
			if (!reader.Read())
			return rows; // not enough rows, just return
		}
		for (int i = 0; i < pageLength; i++)
		{
			if (!reader.Read())
			break; // we are done
			string key = null;
			
			NetROS.Tiers.Entities.DokumentStavka c = null;
			if (DataRepository.Provider.UseEntityFactory)
			{
			key = new System.Text.StringBuilder("DokumentStavka")
			.Append("|").Append((reader.IsDBNull(((int)NetROS.Tiers.Entities.DokumentStavkaColumn.ID - 1))?(int)0:(System.Int32)reader[((int)NetROS.Tiers.Entities.DokumentStavkaColumn.ID - 1)]).ToString()).ToString();
			c = EntityManager.LocateOrCreate<DokumentStavka>(
			key.ToString(), // EntityTrackingKey
			"DokumentStavka",  //Creational Type
			DataRepository.Provider.EntityCreationalFactoryType,  //Factory used to create entity
			DataRepository.Provider.EnableEntityTracking); // Track this entity?
			}
			else
			{
			c = new NetROS.Tiers.Entities.DokumentStavka();
			}
			
			if (!DataRepository.Provider.EnableEntityTracking ||
			c.EntityState == EntityState.Added ||
			(DataRepository.Provider.EnableEntityTracking &&
			((DataRepository.Provider.CurrentLoadPolicy == LoadPolicy.PreserveChanges && c.EntityState == EntityState.Unchanged) ||
			(DataRepository.Provider.CurrentLoadPolicy == LoadPolicy.DiscardChanges && (c.EntityState == EntityState.Unchanged ||
								c.EntityState == EntityState.Changed)))))
						{
			c.SuppressEntityEvents = true;
			c.ID = (System.Int32)reader["ID"];
			c.IDOrgJedOd = (System.Int32)reader["IDOrgJedOd"];
			c.IDArtikl = reader.IsDBNull(reader.GetOrdinal("IDArtikl")) ? null : (System.Int32?)reader["IDArtikl"];
			c.Kolicina = (System.Single)reader["Kolicina"];
			c.Kolicina2 = reader.IsDBNull(reader.GetOrdinal("Kolicina2")) ? null : (System.Single?)reader["Kolicina2"];
			c.Kolicina3 = reader.IsDBNull(reader.GetOrdinal("Kolicina3")) ? null : (System.Single?)reader["Kolicina3"];
			c.Kolicina4 = reader.IsDBNull(reader.GetOrdinal("Kolicina4")) ? null : (System.Single?)reader["Kolicina4"];
			c.Vrijednost = reader.IsDBNull(reader.GetOrdinal("Vrijednost")) ? null : (System.Decimal?)reader["Vrijednost"];
			c.Vrijednost2 = reader.IsDBNull(reader.GetOrdinal("Vrijednost2")) ? null : (System.Decimal?)reader["Vrijednost2"];
			c.Vrijednost3 = reader.IsDBNull(reader.GetOrdinal("Vrijednost3")) ? null : (System.Decimal?)reader["Vrijednost3"];
			c.Vrijednost4 = reader.IsDBNull(reader.GetOrdinal("Vrijednost4")) ? null : (System.Decimal?)reader["Vrijednost4"];
			c.Postotak = reader.IsDBNull(reader.GetOrdinal("Postotak")) ? null : (System.Single?)reader["Postotak"];
			c.Postotak2 = reader.IsDBNull(reader.GetOrdinal("Postotak2")) ? null : (System.Single?)reader["Postotak2"];
			c.Postotak3 = reader.IsDBNull(reader.GetOrdinal("Postotak3")) ? null : (System.Single?)reader["Postotak3"];
			c.Postotak4 = reader.IsDBNull(reader.GetOrdinal("Postotak4")) ? null : (System.Single?)reader["Postotak4"];
			c.Postotak5 = reader.IsDBNull(reader.GetOrdinal("Postotak5")) ? null : (System.Single?)reader["Postotak5"];
			c.IDDokument = (System.Int32)reader["IDDokument"];
			c.IDValuta = reader.IsDBNull(reader.GetOrdinal("IDValuta")) ? null : (System.Int32?)reader["IDValuta"];
			c.IDValuta2 = reader.IsDBNull(reader.GetOrdinal("IDValuta2")) ? null : (System.Int32?)reader["IDValuta2"];
			c.IDUserCreated = (System.Int32)reader["IDUserCreated"];
			c.IDUserModified = (System.Int32)reader["IDUserModified"];
			c.Prilagoden = reader.IsDBNull(reader.GetOrdinal("Prilagoden")) ? null : (System.String)reader["Prilagoden"];
			c.PrilagodenJedMj = reader.IsDBNull(reader.GetOrdinal("PrilagodenJedMj")) ? null : (System.String)reader["PrilagodenJedMj"];
			c.Opisno = reader.IsDBNull(reader.GetOrdinal("Opisno")) ? null : (System.String)reader["Opisno"];
			c.DateCreated = (System.DateTime)reader["DateCreated"];
			c.DateModified = (System.DateTime)reader["DateModified"];
			c.DateUICreated = (System.DateTime)reader["DateUICreated"];
			c.EntityTrackingKey = key;
			c.AcceptChanges();
			c.SuppressEntityEvents = false;
			}
			rows.Add(c);
		}
		return rows;
		}		
		/// <summary>
		/// Refreshes the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> object from the <see cref="IDataReader"/>.
		/// </summary>
		/// <param name="reader">The <see cref="IDataReader"/> to read from.</param>
		/// <param name="entity">The <see cref="NetROS.Tiers.Entities.DokumentStavka"/> object to refresh.</param>
		public static void RefreshEntity(IDataReader reader, NetROS.Tiers.Entities.DokumentStavka entity)
		{
			if (!reader.Read()) return;
			
			entity.ID = (System.Int32)reader["ID"];
			entity.IDOrgJedOd = (System.Int32)reader["IDOrgJedOd"];
			entity.IDArtikl = reader.IsDBNull(reader.GetOrdinal("IDArtikl")) ? null : (System.Int32?)reader["IDArtikl"];
			entity.Kolicina = (System.Single)reader["Kolicina"];
			entity.Kolicina2 = reader.IsDBNull(reader.GetOrdinal("Kolicina2")) ? null : (System.Single?)reader["Kolicina2"];
			entity.Kolicina3 = reader.IsDBNull(reader.GetOrdinal("Kolicina3")) ? null : (System.Single?)reader["Kolicina3"];
			entity.Kolicina4 = reader.IsDBNull(reader.GetOrdinal("Kolicina4")) ? null : (System.Single?)reader["Kolicina4"];
			entity.Vrijednost = reader.IsDBNull(reader.GetOrdinal("Vrijednost")) ? null : (System.Decimal?)reader["Vrijednost"];
			entity.Vrijednost2 = reader.IsDBNull(reader.GetOrdinal("Vrijednost2")) ? null : (System.Decimal?)reader["Vrijednost2"];
			entity.Vrijednost3 = reader.IsDBNull(reader.GetOrdinal("Vrijednost3")) ? null : (System.Decimal?)reader["Vrijednost3"];
			entity.Vrijednost4 = reader.IsDBNull(reader.GetOrdinal("Vrijednost4")) ? null : (System.Decimal?)reader["Vrijednost4"];
			entity.Postotak = reader.IsDBNull(reader.GetOrdinal("Postotak")) ? null : (System.Single?)reader["Postotak"];
			entity.Postotak2 = reader.IsDBNull(reader.GetOrdinal("Postotak2")) ? null : (System.Single?)reader["Postotak2"];
			entity.Postotak3 = reader.IsDBNull(reader.GetOrdinal("Postotak3")) ? null : (System.Single?)reader["Postotak3"];
			entity.Postotak4 = reader.IsDBNull(reader.GetOrdinal("Postotak4")) ? null : (System.Single?)reader["Postotak4"];
			entity.Postotak5 = reader.IsDBNull(reader.GetOrdinal("Postotak5")) ? null : (System.Single?)reader["Postotak5"];
			entity.IDDokument = (System.Int32)reader["IDDokument"];
			entity.IDValuta = reader.IsDBNull(reader.GetOrdinal("IDValuta")) ? null : (System.Int32?)reader["IDValuta"];
			entity.IDValuta2 = reader.IsDBNull(reader.GetOrdinal("IDValuta2")) ? null : (System.Int32?)reader["IDValuta2"];
			entity.IDUserCreated = (System.Int32)reader["IDUserCreated"];
			entity.IDUserModified = (System.Int32)reader["IDUserModified"];
			entity.Prilagoden = reader.IsDBNull(reader.GetOrdinal("Prilagoden")) ? null : (System.String)reader["Prilagoden"];
			entity.PrilagodenJedMj = reader.IsDBNull(reader.GetOrdinal("PrilagodenJedMj")) ? null : (System.String)reader["PrilagodenJedMj"];
			entity.Opisno = reader.IsDBNull(reader.GetOrdinal("Opisno")) ? null : (System.String)reader["Opisno"];
			entity.DateCreated = (System.DateTime)reader["DateCreated"];
			entity.DateModified = (System.DateTime)reader["DateModified"];
			entity.DateUICreated = (System.DateTime)reader["DateUICreated"];
			entity.AcceptChanges();
		}
		
		/// <summary>
		/// Refreshes the <see cref="NetROS.Tiers.Entities.DokumentStavka"/> object from the <see cref="DataSet"/>.
		/// </summary>
		/// <param name="dataSet">The <see cref="DataSet"/> to read from.</param>
		/// <param name="entity">The <see cref="NetROS.Tiers.Entities.DokumentStavka"/> object.</param>
		public static void RefreshEntity(DataSet dataSet, NetROS.Tiers.Entities.DokumentStavka entity)
		{
			DataRow dataRow = dataSet.Tables[0].Rows[0];
			
			entity.ID = (System.Int32)dataRow["ID"];
			entity.IDOrgJedOd = (System.Int32)dataRow["IDOrgJedOd"];
			entity.IDArtikl = Convert.IsDBNull(dataRow["IDArtikl"]) ? null : (System.Int32?)dataRow["IDArtikl"];
			entity.Kolicina = (System.Single)dataRow["Kolicina"];
			entity.Kolicina2 = Convert.IsDBNull(dataRow["Kolicina2"]) ? null : (System.Single?)dataRow["Kolicina2"];
			entity.Kolicina3 = Convert.IsDBNull(dataRow["Kolicina3"]) ? null : (System.Single?)dataRow["Kolicina3"];
			entity.Kolicina4 = Convert.IsDBNull(dataRow["Kolicina4"]) ? null : (System.Single?)dataRow["Kolicina4"];
			entity.Vrijednost = Convert.IsDBNull(dataRow["Vrijednost"]) ? null : (System.Decimal?)dataRow["Vrijednost"];
			entity.Vrijednost2 = Convert.IsDBNull(dataRow["Vrijednost2"]) ? null : (System.Decimal?)dataRow["Vrijednost2"];
			entity.Vrijednost3 = Convert.IsDBNull(dataRow["Vrijednost3"]) ? null : (System.Decimal?)dataRow["Vrijednost3"];
			entity.Vrijednost4 = Convert.IsDBNull(dataRow["Vrijednost4"]) ? null : (System.Decimal?)dataRow["Vrijednost4"];
			entity.Postotak = Convert.IsDBNull(dataRow["Postotak"]) ? null : (System.Single?)dataRow["Postotak"];
			entity.Postotak2 = Convert.IsDBNull(dataRow["Postotak2"]) ? null : (System.Single?)dataRow["Postotak2"];
			entity.Postotak3 = Convert.IsDBNull(dataRow["Postotak3"]) ? null : (System.Single?)dataRow["Postotak3"];
			entity.Postotak4 = Convert.IsDBNull(dataRow["Postotak4"]) ? null : (System.Single?)dataRow["Postotak4"];
			entity.Postotak5 = Convert.IsDBNull(dataRow["Postotak5"]) ? null : (System.Single?)dataRow["Postotak5"];
			entity.IDDokument = (System.Int32)dataRow["IDDokument"];
			entity.IDValuta = Convert.IsDBNull(dataRow["IDValuta"]) ? null : (System.Int32?)dataRow["IDValuta"];
			entity.IDValuta2 = Convert.IsDBNull(dataRow["IDValuta2"]) ? null : (System.Int32?)dataRow["IDValuta2"];
			entity.IDUserCreated = (System.Int32)dataRow["IDUserCreated"];
			entity.IDUserModified = (System.Int32)dataRow["IDUserModified"];
			entity.Prilagoden = Convert.IsDBNull(dataRow["Prilagoden"]) ? null : (System.String)dataRow["Prilagoden"];
			entity.PrilagodenJedMj = Convert.IsDBNull(dataRow["PrilagodenJedMj"]) ? null : (System.String)dataRow["PrilagodenJedMj"];
			entity.Opisno = Convert.IsDBNull(dataRow["Opisno"]) ? null : (System.String)dataRow["Opisno"];
			entity.DateCreated = (System.DateTime)dataRow["DateCreated"];
			entity.DateModified = (System.DateTime)dataRow["DateModified"];
			entity.DateUICreated = (System.DateTime)dataRow["DateUICreated"];
			entity.AcceptChanges();
		}
		#endregion 
		
		#region DeepLoad Methods
		/// <summary>
		/// Deep Loads the <see cref="IEntity"/> object with criteria based of the child 
		/// property collections only N Levels Deep based on the <see cref="DeepLoadType"/>.
		/// </summary>
		/// <remarks>
		/// Use this method with caution as it is possible to DeepLoad with Recursion and traverse an entire object graph.
		/// </remarks>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="entity">The <see cref="NetROS.Tiers.Entities.DokumentStavka"/> object to load.</param>
		/// <param name="deep">Boolean. A flag that indicates whether to recursively save all Property Collection that are descendants of this instance. If True, saves the complete object graph below this object. If False, saves this object only. </param>
		/// <param name="deepLoadType">DeepLoadType Enumeration to Include/Exclude object property collections from Load.</param>
		/// <param name="childTypes">NetROS.Tiers.Entities.DokumentStavka Property Collection Type Array To Include or Exclude from Load</param>
		/// <param name="innerList">A collection of child types for easy access.</param>
	    /// <exception cref="ArgumentNullException">entity or childTypes is null.</exception>
	    /// <exception cref="ArgumentException">deepLoadType has invalid value.</exception>
		internal override void DeepLoad(TransactionManager transactionManager, NetROS.Tiers.Entities.DokumentStavka entity, bool deep, DeepLoadType deepLoadType, System.Type[] childTypes, DeepSession innerList)
		{
			if(entity == null)
				return;

			#region IDArtiklSource	
			if (CanDeepLoad(entity, "Artikl|IDArtiklSource", deepLoadType, innerList) 
				&& entity.IDArtiklSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IDArtikl ?? (int)0);
				Artikl tmpEntity = EntityManager.LocateEntity<Artikl>(EntityLocator.ConstructKeyFromPkItems(typeof(Artikl), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IDArtiklSource = tmpEntity;
				else
					entity.IDArtiklSource = DataRepository.ArtiklProvider.GetByID(transactionManager, (entity.IDArtikl ?? (int)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IDArtiklSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IDArtiklSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.ArtiklProvider.DeepLoad(transactionManager, entity.IDArtiklSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IDArtiklSource

			#region IDUserModifiedSource	
			if (CanDeepLoad(entity, "Djelatnik|IDUserModifiedSource", deepLoadType, innerList) 
				&& entity.IDUserModifiedSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.IDUserModified;
				Djelatnik tmpEntity = EntityManager.LocateEntity<Djelatnik>(EntityLocator.ConstructKeyFromPkItems(typeof(Djelatnik), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IDUserModifiedSource = tmpEntity;
				else
					entity.IDUserModifiedSource = DataRepository.DjelatnikProvider.GetByID(transactionManager, entity.IDUserModified);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IDUserModifiedSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IDUserModifiedSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.DjelatnikProvider.DeepLoad(transactionManager, entity.IDUserModifiedSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IDUserModifiedSource

			#region IDDokumentSource	
			if (CanDeepLoad(entity, "Dokument|IDDokumentSource", deepLoadType, innerList) 
				&& entity.IDDokumentSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.IDDokument;
				Dokument tmpEntity = EntityManager.LocateEntity<Dokument>(EntityLocator.ConstructKeyFromPkItems(typeof(Dokument), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IDDokumentSource = tmpEntity;
				else
					entity.IDDokumentSource = DataRepository.DokumentProvider.GetByID(transactionManager, entity.IDDokument);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IDDokumentSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IDDokumentSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.DokumentProvider.DeepLoad(transactionManager, entity.IDDokumentSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IDDokumentSource

			#region IDOrgJedOdSource	
			if (CanDeepLoad(entity, "Organizacija|IDOrgJedOdSource", deepLoadType, innerList) 
				&& entity.IDOrgJedOdSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.IDOrgJedOd;
				Organizacija tmpEntity = EntityManager.LocateEntity<Organizacija>(EntityLocator.ConstructKeyFromPkItems(typeof(Organizacija), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IDOrgJedOdSource = tmpEntity;
				else
					entity.IDOrgJedOdSource = DataRepository.OrganizacijaProvider.GetByID(transactionManager, entity.IDOrgJedOd);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IDOrgJedOdSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IDOrgJedOdSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.OrganizacijaProvider.DeepLoad(transactionManager, entity.IDOrgJedOdSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IDOrgJedOdSource

			#region IDValutaSource	
			if (CanDeepLoad(entity, "Valuta|IDValutaSource", deepLoadType, innerList) 
				&& entity.IDValutaSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IDValuta ?? (int)0);
				Valuta tmpEntity = EntityManager.LocateEntity<Valuta>(EntityLocator.ConstructKeyFromPkItems(typeof(Valuta), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IDValutaSource = tmpEntity;
				else
					entity.IDValutaSource = DataRepository.ValutaProvider.GetByID(transactionManager, (entity.IDValuta ?? (int)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IDValutaSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IDValutaSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.ValutaProvider.DeepLoad(transactionManager, entity.IDValutaSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IDValutaSource

			#region IDValuta2Source	
			if (CanDeepLoad(entity, "Valuta|IDValuta2Source", deepLoadType, innerList) 
				&& entity.IDValuta2Source == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IDValuta2 ?? (int)0);
				Valuta tmpEntity = EntityManager.LocateEntity<Valuta>(EntityLocator.ConstructKeyFromPkItems(typeof(Valuta), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IDValuta2Source = tmpEntity;
				else
					entity.IDValuta2Source = DataRepository.ValutaProvider.GetByID(transactionManager, (entity.IDValuta2 ?? (int)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IDValuta2Source' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IDValuta2Source != null)
				{
					innerList.SkipChildren = true;
					DataRepository.ValutaProvider.DeepLoad(transactionManager, entity.IDValuta2Source, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IDValuta2Source
			
			//used to hold DeepLoad method delegates and fire after all the local children have been loaded.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
			// Deep load child collections  - Call GetByID methods when available
			
			#region DokumentStavkaOpisCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<DokumentStavkaOpis>|DokumentStavkaOpisCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'DokumentStavkaOpisCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.DokumentStavkaOpisCollection = DataRepository.DokumentStavkaOpisProvider.GetByIDDokumentStavka(transactionManager, entity.ID);

				if (deep && entity.DokumentStavkaOpisCollection.Count > 0)
				{
					deepHandles.Add("DokumentStavkaOpisCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<DokumentStavkaOpis>) DataRepository.DokumentStavkaOpisProvider.DeepLoad,
						new object[] { transactionManager, entity.DokumentStavkaOpisCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			//Fire all DeepLoad Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			deepHandles = null;
		}
		
		#endregion 
		
		#region DeepSave Methods

		/// <summary>
		/// Deep Save the entire object graph of the NetROS.Tiers.Entities.DokumentStavka object with criteria based of the child 
		/// Type property array and DeepSaveType.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="entity">NetROS.Tiers.Entities.DokumentStavka instance</param>
		/// <param name="deepSaveType">DeepSaveType Enumeration to Include/Exclude object property collections from Save.</param>
		/// <param name="childTypes">NetROS.Tiers.Entities.DokumentStavka Property Collection Type Array To Include or Exclude from Save</param>
		/// <param name="innerList">A Hashtable of child types for easy access.</param>
		internal override bool DeepSave(TransactionManager transactionManager, NetROS.Tiers.Entities.DokumentStavka entity, DeepSaveType deepSaveType, System.Type[] childTypes, DeepSession innerList)
		{	
			if (entity == null)
				return false;
							
			#region Composite Parent Properties
			//Save Source Composite Properties, however, don't call deep save on them.  
			//So they only get saved a single level deep.
			
			#region IDArtiklSource
			if (CanDeepSave(entity, "Artikl|IDArtiklSource", deepSaveType, innerList) 
				&& entity.IDArtiklSource != null)
			{
				DataRepository.ArtiklProvider.Save(transactionManager, entity.IDArtiklSource);
				entity.IDArtikl = entity.IDArtiklSource.ID;
			}
			#endregion 
			
			#region IDUserModifiedSource
			if (CanDeepSave(entity, "Djelatnik|IDUserModifiedSource", deepSaveType, innerList) 
				&& entity.IDUserModifiedSource != null)
			{
				DataRepository.DjelatnikProvider.Save(transactionManager, entity.IDUserModifiedSource);
				entity.IDUserModified = entity.IDUserModifiedSource.ID;
			}
			#endregion 
			
			#region IDDokumentSource
			if (CanDeepSave(entity, "Dokument|IDDokumentSource", deepSaveType, innerList) 
				&& entity.IDDokumentSource != null)
			{
				DataRepository.DokumentProvider.Save(transactionManager, entity.IDDokumentSource);
				entity.IDDokument = entity.IDDokumentSource.ID;
			}
			#endregion 
			
			#region IDOrgJedOdSource
			if (CanDeepSave(entity, "Organizacija|IDOrgJedOdSource", deepSaveType, innerList) 
				&& entity.IDOrgJedOdSource != null)
			{
				DataRepository.OrganizacijaProvider.Save(transactionManager, entity.IDOrgJedOdSource);
				entity.IDOrgJedOd = entity.IDOrgJedOdSource.ID;
			}
			#endregion 
			
			#region IDValutaSource
			if (CanDeepSave(entity, "Valuta|IDValutaSource", deepSaveType, innerList) 
				&& entity.IDValutaSource != null)
			{
				DataRepository.ValutaProvider.Save(transactionManager, entity.IDValutaSource);
				entity.IDValuta = entity.IDValutaSource.ID;
			}
			#endregion 
			
			#region IDValuta2Source
			if (CanDeepSave(entity, "Valuta|IDValuta2Source", deepSaveType, innerList) 
				&& entity.IDValuta2Source != null)
			{
				DataRepository.ValutaProvider.Save(transactionManager, entity.IDValuta2Source);
				entity.IDValuta2 = entity.IDValuta2Source.ID;
			}
			#endregion 
			#endregion Composite Parent Properties

			// Save Root Entity through Provider
			if (!entity.IsDeleted)
				this.Save(transactionManager, entity);
			
			//used to hold DeepSave method delegates and fire after all the local children have been saved.
			Dictionary<Delegate, object> deepHandles = new Dictionary<Delegate, object>();
	
			#region List<DokumentStavkaOpis>
				if (CanDeepSave(entity.DokumentStavkaOpisCollection, "List<DokumentStavkaOpis>|DokumentStavkaOpisCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(DokumentStavkaOpis child in entity.DokumentStavkaOpisCollection)
					{
						if(child.IDDokumentStavkaSource != null)
							child.IDDokumentStavka = child.IDDokumentStavkaSource.ID;
						else
							child.IDDokumentStavka = entity.ID;

					}

					if (entity.DokumentStavkaOpisCollection.Count > 0 || entity.DokumentStavkaOpisCollection.DeletedItems.Count > 0)
					{
						DataRepository.DokumentStavkaOpisProvider.Save(transactionManager, entity.DokumentStavkaOpisCollection);
						
						deepHandles.Add(
							(DeepSaveHandle< DokumentStavkaOpis >) DataRepository.DokumentStavkaOpisProvider.DeepSave,
							new object[] { transactionManager, entity.DokumentStavkaOpisCollection, deepSaveType, childTypes, innerList }
						);
					}
				} 
			#endregion 
				
			//Fire all DeepSave Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			
			// Save Root Entity through Provider, if not already saved in delete mode
			if (entity.IsDeleted)
				this.Save(transactionManager, entity);
				

			deepHandles = null;
						
			return true;
		}
		#endregion
	} // end class
	
	#region DokumentStavkaChildEntityTypes
	
	///<summary>
	/// Enumeration used to expose the different child entity types 
	/// for child properties in <c>NetROS.Tiers.Entities.DokumentStavka</c>
	///</summary>
	public enum DokumentStavkaChildEntityTypes
	{
		
		///<summary>
		/// Composite Property for <c>Artikl</c> at IDArtiklSource
		///</summary>
		[ChildEntityType(typeof(Artikl))]
		Artikl,
			
		///<summary>
		/// Composite Property for <c>Djelatnik</c> at IDUserModifiedSource
		///</summary>
		[ChildEntityType(typeof(Djelatnik))]
		Djelatnik,
			
		///<summary>
		/// Composite Property for <c>Dokument</c> at IDDokumentSource
		///</summary>
		[ChildEntityType(typeof(Dokument))]
		Dokument,
			
		///<summary>
		/// Composite Property for <c>Organizacija</c> at IDOrgJedOdSource
		///</summary>
		[ChildEntityType(typeof(Organizacija))]
		Organizacija,
			
		///<summary>
		/// Composite Property for <c>Valuta</c> at IDValutaSource
		///</summary>
		[ChildEntityType(typeof(Valuta))]
		Valuta,
	
		///<summary>
		/// Collection of <c>DokumentStavka</c> as OneToMany for DokumentStavkaOpisCollection
		///</summary>
		[ChildEntityType(typeof(TList<DokumentStavkaOpis>))]
		DokumentStavkaOpisCollection,
	}
	
	#endregion DokumentStavkaChildEntityTypes
	
	#region DokumentStavkaFilterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;DokumentStavkaColumn&gt;"/> class
	/// that is used exclusively with a <see cref="DokumentStavka"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DokumentStavkaFilterBuilder : SqlFilterBuilder<DokumentStavkaColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DokumentStavkaFilterBuilder class.
		/// </summary>
		public DokumentStavkaFilterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the DokumentStavkaFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DokumentStavkaFilterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DokumentStavkaFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DokumentStavkaFilterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DokumentStavkaFilterBuilder
	
	#region DokumentStavkaParameterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ParameterizedSqlFilterBuilder&lt;DokumentStavkaColumn&gt;"/> class
	/// that is used exclusively with a <see cref="DokumentStavka"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DokumentStavkaParameterBuilder : ParameterizedSqlFilterBuilder<DokumentStavkaColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DokumentStavkaParameterBuilder class.
		/// </summary>
		public DokumentStavkaParameterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the DokumentStavkaParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DokumentStavkaParameterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DokumentStavkaParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DokumentStavkaParameterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DokumentStavkaParameterBuilder
} // end namespace
